#!/bin/ash -efu
#
# mki-cache-prepare-workdir
#
# This file is part of mkimage
# Copyright (C) 2007-2009  Alexey Gladkov <gladkov.alexey@gmail.com>
#
# This file is covered by the GNU General Public License,
# which should be included with mkimage as the file COPYING.
#

pkgboxdir="${PKGBOX:?directory required}"

aptbox="$dir/aptbox"
pkgbox="$pkgboxdir/aptbox"

payload() {
	stat --printf='%A\t%s\t%Y\n' "$makefile"

	if [ -d "$aptbox/var" ]; then
		cd "$aptbox/var"
		find -name '*_release' -exec cat '{}' '+'
		cd - >/dev/null
	fi

	if [ -d "$pkgbox/var" ]; then
		cd "$pkgbox/var"
		find -name '*_release' -exec cat '{}' '+'
		cd - >/dev/null
	fi
}
